package org.dubnation.base.excel.upload.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.dubnation.base.excel.upload.util.ExcelVerify;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@ExcelTarget(value = "department")
public class DepartmentDTO extends ExcelVerify implements Serializable {

    private Long id;
    /**
     * 部门名称
     */
    @NotBlank(message = "所属部门不能为空")
    @Excel(name = "所属部门_departmentDTO", isImportField = "true_departmentDTO")
    private String name;
}
